﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using System.Data.Sql;

namespace DAL
{
    public class DataAccessLayer
    {

        public string chuoiketnoi = @"Data Source=.\MINHKHA01 ; Initial Catalog = DoAn2 ; User ID = sa; Password = '123456';Max Pool Size=300;Min Pool Size=5";
        DataDataContext dt;
        public DataDataContext GetKetnoi()
        {
            dt = new DataDataContext(chuoiketnoi);
            
            dt.Connection.Open();
            return dt;
        }
        public int random(int a, int b)
        {
            Random rand = new Random();
            int x = rand.Next(a, b);
            return x;
        }
    }
}
